package com.esri.core.internal.tasks.ags;

import java.io.File;
import java.io.InputStream;
import java.util.LinkedHashMap;
import java.util.Map;

/* loaded from: classes.dex */
public class c extends com.esri.core.internal.tasks.f {
    private static final long serialVersionUID = 1;
    long a;
    long[] b;
    File c;
    InputStream d;
    String e;
    String f;
    String g;

    @Override // com.esri.core.internal.tasks.f
    public boolean validate() {
        return true;
    }

    public long a() {
        return this.a;
    }

    public void a(long j) {
        this.a = j;
    }

    public long[] b() {
        return this.b;
    }

    public void a(long[] jArr) {
        this.b = jArr;
    }

    public File c() {
        return this.c;
    }

    public void a(File file, String str) {
        this.c = file;
        this.f = str;
    }

    public void a(InputStream inputStream, String str, String str2) {
        this.d = inputStream;
        this.e = str;
        this.f = str2;
    }

    public InputStream d() {
        return this.d;
    }

    public String e() {
        return this.f;
    }

    public void a(String str) {
        this.e = str;
    }

    public String f() {
        return this.e;
    }

    public void b(String str) {
        this.f = str;
    }

    public String g() {
        return this.g;
    }

    public void c(String str) {
        this.g = str;
    }

    @Override // com.esri.core.internal.tasks.f
    public Map<String, String> generateRequestParams() throws Exception {
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        linkedHashMap.put("f", "json");
        long[] jArr = this.b;
        if (jArr != null && jArr.length > 0) {
            linkedHashMap.put("attachmentIds", b(jArr));
        }
        String str = this.g;
        if (str != null && str.length() > 0) {
            linkedHashMap.put("gdbVersion", this.g);
        }
        return linkedHashMap;
    }

    String b(long[] jArr) throws Exception {
        StringBuilder sb = new StringBuilder();
        boolean z = true;
        for (long j : jArr) {
            if (j >= 0) {
                if (z) {
                    sb.append(j);
                    z = false;
                } else {
                    sb.append(',');
                    sb.append(j);
                }
            }
        }
        return sb.toString();
    }
}
